var express = require('express');
var router = express.Router();
var Mock = require('mockjs');

/* GET home page. */
router.get('/', function(req, res, next) {

    let userData=Mock.mock({
        "data1|7":[{
            "number|300-400":1,
        }],
        "data2|7":[{
            "number|200-300":1,
        }],
        "data3|7":[{
            "number|100-500":1,
        }],
        "data4|7":[{
            "number|800-1000":1,
        }],
        "data5|7":[{
            "number|600-1300":1,
        }],
        "data6|7":[{
            "number|300-500":1,
        }],
        "data7|7":[{
            "number|200-400":1,
        }],
        "data8|7":[{
            "number|100-300":1,
        }],
        "data9|7":[{
            "number|50-120":1,
        }],
    })
    let data={};
    let data1=[];
    let data2=[];
    let data3=[];
    let data4=[];
    let data5=[];
    let data6=[];
    let data7=[];
    let data8=[];
    let data9=[];
    for (let i=0;i<7;i++){
        data1[i]=userData.data1[i].number;
        data2[i]=userData.data2[i].number;
        data3[i]=userData.data3[i].number;
        data4[i]=userData.data4[i].number;
        data5[i]=userData.data5[i].number;
        data6[i]=userData.data6[i].number;
        data7[i]=userData.data7[i].number;
        data8[i]=userData.data8[i].number;
        data9[i]=userData.data9[i].number;
    }
    data["data1"]=data1;
    data["data2"]=data2;
    data["data3"]=data3;
    data["data4"]=data4;
    data["data5"]=data5;
    data["data6"]=data6;
    data["data7"]=data7;
    data["data8"]=data8;
    data["data9"]=data9;
    res.json(data);

});
module.exports = router;
